package cn.edu.guet.service.om.impl;

import cn.edu.guet.bean.om.FGAll;
import cn.edu.guet.bean.om.FRAll;
import cn.edu.guet.bean.om.FRNAll;
import cn.edu.guet.bean.om.OUsers;
import cn.edu.guet.mapper.om.OUserMapper;
import cn.edu.guet.service.om.OUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OUserServicelmpl implements OUserService {
    @Autowired
    private OUserMapper oUserMapper;
    @Override
    public List<OUsers> viewOUsers(Integer gid) {
        return oUserMapper.viewOUsers(gid);
    }

    @Override
    public List<FRAll> findRoleAll() {
        return oUserMapper.findRoleAll();
    }

    @Override
    public List<FGAll> findGnameAll() {
        return oUserMapper.findGnameAll();
    }

    @Override
    public void update(OUsers oUsers) {
        oUserMapper.update(oUsers);
    }

    @Override
    public Integer findByGName(String gname) {
        return oUserMapper.findByGName(gname);
    }

    @Override
    public List<FRNAll> findRealNameAll() {
        return oUserMapper.findRealNameAll();
    }

    @Override
    public void insertOUser(OUsers oUsers) {
        oUserMapper.insertOUser(oUsers);
    }

    @Override
    public List<OUsers> searchOUser(String realname) {
        return oUserMapper.searchOUser(realname);
    }

    @Override
    public String getRole(String loginusername) {
        return oUserMapper.getRole(loginusername);
    }

    @Override
    public Integer getGid(String loginusername) {
        return oUserMapper.getGid(loginusername);
    }



    @Override
    public void updateOUser(String username) {
        oUserMapper.updateOUser(username);
    }

    @Override
    public OUsers findByName(String username) {
        return oUserMapper.findByName(username);
    }

}
